<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('user_target', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->nullable(false)->comment('用户id');
            $table->integer('classify')->nullable(false)->comment('目标分类 1:每日目标 2:每周目标 3:月度目标 4:年度目标');
            $table->integer('type')->nullable(false)->comment('目标类型');
            $table->text('content')->nullable(false)->comment('目标内容');
            $table->timestamps();
            $table->comment('用户目标');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('user_target');
    }

};
